<?php
$userId = $_GET['id'];
$conn=new mysqli("localhost","root","123456","htmlkeshe");

$sql="SELECT * from user where id=".$userId;
$result=$conn->query($sql) or die(mysqli_error($conn));;
$row = $result->fetch_assoc();
$num = $row["warning"]+1;
$sql = "UPDATE user set warning=$num WHERE id=".$userId;
$conn->query($sql);
header('Refresh: 0; url=Personal.php?type=6');
$conn->close();
?>
<script>
    alert("警告成功")
</script>
<?php

?>



